package com.wu.service;

import com.wu.dao.UserMapper;
import com.wu.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wufei
 * @date 2018/3/29/029 12:20
 */
@Service("userService")
public class UserService {

    @Autowired
    UserMapper userMapper;

    public int insertSelective(User user){
        return userMapper.insertSelective(user);
    }

    public List<User> findAll(){
        return userMapper.findAll();
    }

    public void deleteAll(){
        userMapper.deleteAll();
    }

    public List<User> topTen(){
        return userMapper.topTen();
    }
}
